package com.kaikeba.bean;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Message {
    private Object data;
    private String msg;
    private int status;

    /**
     * 将Java中抽象的消息对象转换为JSON格式的字符串
     *
     * @return
     */
    public String toJSON() {
        return JSON.toJSONString(this);
    }
}